#pragma warning disable 0618
using System;
using System.Collections.Generic;
using Table.DataModel;
namespace Table.Dao
{
    public class TableBuffViewSummonDao:DaoBase<TableBuffViewSummon>
    {
        public override string GetFileName()
        {
            return "TableBuffViewSummon.csv";
        }
        public override void BuildIndex()
        {
            if (cacheList != null)
            {
                cachePrimaryInt = new Dictionary<int, TableBuffViewSummon>(cacheList.Count);
            }
            base.BuildIndex();
        }
        public override void AddPrimaryIndex(TableBuffViewSummon model)
        {
            #if UNITY_EDITOR
            if(cachePrimaryInt.ContainsKey(model.id)) UnityEngine.Debug.LogError("数据表id重复:TableBuffViewSummon->id: " + model.id);
            #endif
            cachePrimaryInt[model.id] = model;
        }
        protected override TableBuffViewSummon ParseRowData(string[] rowData)
        {
            TableBuffViewSummon data = new TableBuffViewSummon();
            if (!string.IsNullOrEmpty(rowData[0]))
            {
                data.id = int.Parse(rowData[0]);
            }
            if (!string.IsNullOrEmpty(rowData[1]))
            {
                data.modelId = int.Parse(rowData[1]);
            }
            if (!string.IsNullOrEmpty(rowData[2]))
            {
                data.modelScale = float.Parse(rowData[2]);
            }
            if (!string.IsNullOrEmpty(rowData[3]))
            {
                data.isStatic = int.Parse(rowData[3]);
            }
            if (!string.IsNullOrEmpty(rowData[4]))
            {
                data.standPosType = int.Parse(rowData[4]);
            }
            if (!string.IsNullOrEmpty(rowData[5]))
            {
                data.standPosArgs = rowData[5];
            }
            if (!string.IsNullOrEmpty(rowData[6]))
            {
                data.apppearAniName = rowData[6];
            }
            if (!string.IsNullOrEmpty(rowData[7]))
            {
                data.disappearAniName = rowData[7];
            }
            if (!string.IsNullOrEmpty(rowData[8]))
            {
                data.syncAnimLevel = int.Parse(rowData[8]);
            }
            if (!string.IsNullOrEmpty(rowData[9]))
            {
                data.forceSyncAnimConfig = rowData[9];
            }
            if (!string.IsNullOrEmpty(rowData[10]))
            {
                data.IsInvolveByCamera = int.Parse(rowData[10]);
            }
            if (!string.IsNullOrEmpty(rowData[11]))
            {
                data.IsShowInSpecialCam = int.Parse(rowData[11]);
            }
            if (!string.IsNullOrEmpty(rowData[12]))
            {
                data.BuffParticle = ParseData<int>(rowData[12]);
            }
            if (!string.IsNullOrEmpty(rowData[13]))
            {
                data.BuffParticleBoneName = ParseData(rowData[13]);
            }
            if (!string.IsNullOrEmpty(rowData[14]))
            {
                data.BuffOffset = ParseData(rowData[14]);
            }
            if (!string.IsNullOrEmpty(rowData[15]))
            {
                data.HideParticle = int.Parse(rowData[15]);
            }
            if (!string.IsNullOrEmpty(rowData[16]))
            {
                data.HideAniName = ParseData(rowData[16]);
            }
            return data;
        }
    }
}
